<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class OrderComment extends Model
{
    use HasDateTimeFormatter;
    use SoftDeletes;
    protected $table = 'order_comment';

    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    protected $fillable = [
        'order_id',
        'user_id',
        'username',
        'nickname',
        'phone',
        'organization',
        'status',
        'journal_name',
        'journal_area',
        'title',
        'title_href',
        'cover_page',
        'content',
    ];


    public function order()
    {
        return $this->belongsTo(Order::class, 'order_id', 'id');
    }
}
